\newcommand\DrawCenterOfMass[1][]{
  \begin{scope}[#1]
    \fill (0, 0) -- (1, 0) arc [radius=1, start angle=0, end angle=90];
    \fill (0, 0) -- (0, -1) arc [radius=1, start angle=270, end angle=180];
    \draw (0, 0) circle [radius=1];
  \end{scope}
}

\newcommand\DrawWingFrontWithCoordinateSystem[1][]{
  \begin{scope}[#1]
    \DrawCenterOfMass[scale=0.3]
    \draw[dashed, ->] (0, 0) -- (-2, 0) node[above right] {$y_b$};
    \draw[dashed, ->] (0, 0) -- (0, -2) node[above left] {$z_b$};
  \end{scope}
  \DrawWingFront[#1]
}

\newcommand\DrawWingFront[1][]{
  \begin{scope}[#1]
    % Main wing.
    \draw plot [smooth] coordinates {
      (-12.65, 1.45)
      (-12.43, 0.40)
      (-9.5, 0.23)
      (-6.43, 0.07)
      (-3.36, 0.07)
      (-0.3, 0.07)
      (0.3, 0.07)
      (3.36, 0.07)
      (6.43, 0.07)
      (9.5, 0.23)
      (12.43, 0.40)
      (12.65, 1.45)
      (12.85, 1.25)
      (12.43, 0.20)
      (9.5, 0.03)
      (6.43, -0.13)
      (3.36, -0.13)
      (0.3, -0.13)
      (-0.3, -0.13)
      (-3.36, -0.13)
      (-6.43, -0.13)
      (-9.5, 0.03)
      (-12.43, 0.20)
      (-12.85, 1.25)
      (-12.65, 1.45)
    };

    % Horizontal tail.
    \draw (-2.44, 3.55) rectangle (2.47, 3.65);

    % Vertical tail.
    \draw (-0.05, 0.0) rectangle (0.05, 3.6);

    % Pylons.
    \draw (3.55, -1.60) rectangle (3.75, 1.22);
    \draw (1.15, -1.60) rectangle (1.3, 1.22);
    \draw (-1.15, -1.60) rectangle (-1.3, 1.22);
    \draw (-3.55, -1.60) rectangle (-3.75, 1.22);

    % Rotors.
    \draw (-3.64, -1.60) circle [radius=1.1];
    \draw (-1.21, -1.60) circle [radius=1.1];
    \draw (1.21, -1.60) circle [radius=1.1];
    \draw (3.64, -1.60) circle [radius=1.1];
    \draw (-3.64, 1.22) circle [radius=1.03];
    \draw (-1.21, 1.22) circle [radius=1.03];
    \draw (1.21, 1.22) circle [radius=1.03];
    \draw (3.64, 1.22) circle [radius=1.03];
  \end{scope}
}

\newcommand\DrawWingSideWithCoordinateSystem[1][]{
  \begin{scope}[#1]
    \DrawCenterOfMass[scale=0.3]
    \draw[dashed, ->] (0, 0) -- (0, 2) node[above right] {$x_b$};
    \draw[dashed, ->] (0, 0) -- (-2, 0) node[above left] {$z_b$};
  \end{scope}
  \DrawWingSide[#1]
}

\newcommand\DrawWingSide[1][]{
  \begin{scope}[#1]
    % Main wing.
    \DrawCamberedAirfoil[shift={(0, 0.36)}, rotate=-90, scale=1.46]

    % Pylons.
    \draw plot [smooth] coordinates {
      (1.4510, 1.9207)
      (1.1927, 2.3578)
      (0.9825, 1.8961)
      (0.8782, 1.4807)
      (0.0133, 1.3385)
      (-0.0485, 1.3280)
      (-0.4537, 1.2653)
      (-1.2008, 1.1512)
      (-1.3639, 1.5729)
      (-1.6213, 2.0100)
      (-1.8324, 1.5484)
      (-1.8324, 0.1574)
      (-1.6213, 0.1567)
      (-1.3639, 0.1029)
      (-1.2008, 0.0600)
      (-0.4537, -0.4500)
      (-0.0485, -0.4500)
      (0.0133, 0.5645)
      (0.8782, 0.5163)
      (0.9825, 0.5044)
      (1.1927, 0.5054)
      (1.4510, 0.5156)
      (1.4510, 1.9207)
    };

    % Propellers.
    \draw (-1.597 - 1, 1.613) -- (-1.597 + 1, 1.613);
    \draw (1.216 - 1, 1.960) -- (1.216 + 1, 1.960);

    % Fuselage.
    \draw plot [smooth] coordinates {(0, 0) (0, -3) (1.42, -6.7)};

    % H tail.
    \DrawAirfoil[shift={(3.6, -6.25)}, rotate=-90, scale=0.99]

    % V tail.
    \draw (3.45, -6.86) -- (3.45, -7.62) -- (1.42, -7.72) -- (0.0, -7.62) --
          (0.0, -6.89) -- (1.42, -6.70) -- (3.45, -6.86);
  \end{scope}
}

\newcommand\DrawWingBottomWithCoordinateSystem[1][]{
  \begin{scope}[#1]
    \DrawCenterOfMass[scale=0.3]
    \draw[dashed, ->] (0, 0) -- (0, 2) node[above right] {$x_b$};
    \draw[dashed, ->] (0, 0) -- (-2, 0) node[above left] {$y_b$};
  \end{scope}
  \DrawWingBottom[#1]
}

\newcommand\DrawWingBottom[1][]{
  \begin{scope}[#1]
    % Pylons.
    \DrawCamberedAirfoil[shift={(-3.64, 1.32)}, rotate=-90, scale=1.78]
    \DrawCamberedAirfoil[shift={(-1.21, 1.32)}, rotate=-90, scale=1.78]
    \DrawCamberedAirfoil[shift={(1.21, 1.32)}, rotate=-90, scale=1.78]
    \DrawCamberedAirfoil[shift={(3.64, 1.32)}, rotate=-90, scale=1.78]

    % Fuselage.
    \draw (0, 0) -- (0, -6.25);

    % Main wing.
    \draw (-12.85, 0.09) -- (-12.85, -0.58) -- (-9.50, -0.85) --
          (-6.43, -1.1) -- (-0.3, -1.1) -- (0.3, -1.1) -- (6.43, -1.1) --
          (9.50, -0.85) -- (12.85, -0.58) -- (12.85, 0.09) -- (9.50, 0.28) --
          (6.43, 0.36) -- (0.3, 0.36) -- (-0.3, 0.36) -- (-6.43, 0.36) --
          (-9.50, 0.28) -- (-12.85, 0.09);

    % H-Tail.
    \draw (-2.43, -6.68) -- (-2.43, -7.11) -- (2.43, -7.11) --
          (2.43, -6.68) -- (0, -6.25) -- (-2.43, -6.68);

    % V-tail.
    \DrawAirfoil[shift={(0, -6.9)}, rotate=-90, scale=1.03]
  \end{scope}
}
